﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ArithmeticLibrary.Tree
{
    /// <summary>
    /// Abstraktni trida svazujici vsechny uzly aritmetickeho stromu.
    /// </summary>
    public abstract class Node
    {
        public abstract double Evaluate(double x);
        public abstract R Accept<R, C>(IExpressionVisitor<R, C> visitor, C context);
        public R Accept<R>(IExpressionVisitor<R, NoContext> visitor)
        {
            return Accept(visitor, null);
        }
    }
}
